package hongcheng.code_generator.enumeration;



/**
 * 	数据库名枚举
 * */
public enum DbNameEnum {
	MYSQL("mysql"),
	ORACLE("oracle"),
	SQL_SERVER("sqlserver");
	
	private String lowerName;
	
	private DbNameEnum(String lowerName) {
		this.lowerName = lowerName;
	}
	
	public String getLowerName() {
		return this.lowerName;
	}
	
	public static DbNameEnum getByLowerName(String lowerName) {
		for(DbNameEnum db: DbNameEnum.values()) {
			if(db.lowerName.equals(lowerName)) {
				return db;
			}
		}
		throw new RuntimeException(lowerName + "找不到枚举");
	}
}
